#!/bin/bash

yum install -y yum-utils device-mapper-persistent-data lvm2 --skip-broken
yum-config-manager --add-repo http://mirrors.huaweicloud.com/docker-ce/linux/centos/docker-ce.repo
sed -i 's/download.docker.com/mirrors.huaweicloud.com\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo
yum makecache fast
yum install -y docker-ce
systemctl stop firewalld
systemctl disable firewalld
systemctl status firewalld
systemctl start docker
systemctl enable docker.service
docker run -d \
  --privileged \
  --restart=unless-stopped \
  --name=kuboard-spray \
  -e TZ=Asia/Shanghai \
  -p 80:80/tcp \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v ~/kuboard-spray-data:/data \
  eipwork/kuboard-spray:latest-amd64